package cn.iocoder.yudao.module.dlbz.dal.mysql.companypost;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dlbz.dal.dataobject.companypost.CompanyPostDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dlbz.controller.admin.companypost.vo.*;

/**
 * 合作企业岗位 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CompanyPostMapper extends BaseMapperX<CompanyPostDO> {

    default PageResult<CompanyPostDO> selectPage(CompanyPostPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CompanyPostDO>()
                .eqIfPresent(CompanyPostDO::getCompanyId, reqVO.getCompanyId())
                .likeIfPresent(CompanyPostDO::getName, reqVO.getName())
                .betweenIfPresent(CompanyPostDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CompanyPostDO::getId));
    }

}